1. Field of the Invention
The present invention relates to a method of managing execution of tasks by a computer system. The term “task” is used to designate a program or a portion of a program that is recorded in a memory of the computer system so as to be executed by a processor of said system.
2. Brief Discussion of the Related Art
Management of task execution is generally entrusted to a sequencer, which is a computer program of the operating system and which is in charge of ensuring that the tasks are executed properly. For example, the sequencer may be a real-time sequencer.
In certain uses, computer systems need to execute a certain number of tasks having run times, priorities and criticalities that are different. This is particularly complicated when critical tasks that are to be executed at precise times need to co-exist with non-critical tasks having relatively long run times. In addition, certain tasks have run times that vary.
One solution would be to provide, within the computer system, a plurality of processors dedicated to execution of certain tasks. However, such a solution is very costly and, in order to be reliable, requires the various processors to be under-used.
Another solution would be to subdivide the tasks that have long run times into sub-tasks in such a manner that a critical task can be executed between two sub-tasks. However, that involves significant software design constraints and considerably complicates the operations of modifying the tasks. In addition, that does not solve the problem of the tasks that have run times that vary.
The most commonly used solution is to make provision for time to be subdivided in such a manner as to define a succession of execution periods, some of which may be reserved for executing the most critical tasks. The tasks are then executed when they are of the highest priority. However, once more it is difficult to manage execution of the tasks that have run times that vary.
In conventional systems, computation periods (or “time slots”) are defined during which the tasks are executed. When execution of a task is completed before the end of the computation period, the task remains in control and goes into a non-functional loop. The non-functional loop is interrupted at the end of the computation period when the sequencer takes over control in order to launch execution of another task. When execution of a task is not completed at the end of the computation period, the sequencer takes over control in order to launch an error processing algorithm. Having recourse to error processing consumes time and resources.
A method of managing overrun of execution time is known from Document US A 2002/0138542.